﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class human_fileThController : Controller
    {
        private readonly Ihuman_file he;

        public human_fileThController(Ihuman_file he)
        {
            this.he = he;
        }

        public IActionResult human_fileTh()
        {
            return View();
        }
        public IActionResult human_fileThQuery(int? id)
        {
            ViewBag.huf_id = id;
            return View();
        }
        //人力资源复核通过查询
        public async Task<IActionResult> QuerT(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerT(currentPage, pageSize)));
        }
        //人力资源未复核通过查询
        public async Task<IActionResult> QuerT1(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerT1(currentPage, pageSize)));
        }
        //人力资源模糊查询
        public async Task<IActionResult> QuerH(human_file _File,int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerH(_File,currentPage, pageSize)));
        }
        //人力资源未复核模糊查询
        public async Task<IActionResult> QuerH1(human_file _File, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerH1(_File, currentPage, pageSize)));
        }
    }
}
